using System.Collections.Generic;
using Framework.Save;
using LitJson;

namespace GameCore
{
    public abstract class RegionData : GameData
    {
        public string name;
        public List<InventoryData> inventories = new();
        public List<ManagedPrefab> entities = new();

        public override JsonData Serialize()
        {
            var json = new JsonData();
            json.SetJsonType(JsonType.Object);
            json["name"] = name;
            var inv = JsonUtil.NewArray();
            foreach (var inventory in inventories)
            {
                inv.Add(inventory.Serialize());
            }
            json["inventories"] = inv;
            var ent = JsonUtil.NewArray();

            json["entities"] = ent;
            return json;
        }

        public override void Deserialize(JsonData data)
        {
            
        }
    }
}